package gao.xiaolei.dao;

import gao.xiaolei.entity.TimeSheet;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

@Repository("TimeSheetDao")
public interface TimeSheetDao extends JpaRepository<TimeSheet,String> {

    public List<TimeSheet> findByProjectAndUserIdOrderByCheckTimeAsc(String project, String userId);

    public Integer countAllByProjectAndUserIdAndCheckTimeAfterAndCheckTimeBefore(String project, String userId, LocalDateTime begin, LocalDateTime end);
}
